<?
require('./application/views/header.php');

?>

		
		
    	<div id="content"> 
			
        
        	<h2><a name="gegevens">Gegevens wijzigen</a></h2>
           	
            <a href="javascript:history.go(-1);" class="terug">Terug</a>
			
			<?
			if($this -> exists('gegevensErrors')){
			echo '<div class="form_errors">';
			echo '<h3>Oeps ... Foutje</h3>';
            echo '<ul>';
            	
				foreach($this -> gegevensErrors as $error){
				
					echo '<li>' . $error . '</li>';
				
				}
				
            echo '</ul></div>';
            
			}
			
			if($this -> exists('gegevensSucces')){
				echo '<div class="form_succes">';
				echo '<h3>'.$this -> gegevensSucces.'</h3>';
				echo '</div>';
			}
            ?>
            
            <? 
			
				echo $this -> gegevensForm -> render(); 
			
			?>
            
            <h2><a name="profielfoto">Foto wijzigen</a></h2>
            
             	<?
			if($this -> exists('fotoError')){
			echo '<div class="form_errors">';
			echo '<h3>Oeps ... Foutje</h3>';
            echo '<ul>';
            	
				foreach($this -> fotoError as $error){
				
					echo '<li>' . $error . '</li>';
				
				}
				
            echo '</ul></div>';
            
			}
			
			if($this -> exists('fotoSucces')){
				echo '<div class="form_succes">';
				echo '<h3>'.$this -> fotoSucces.'</h3>';
				echo '</div>';
			}
            ?>
            
            <? 
			
				echo $this -> fotoForm -> render(); 
			
			?>
            
              <h2><a name="beschrijving">Beschrijving wijzigen</a></h2>
            
            	<?
			if($this -> exists('beschrError')){
			echo '<div class="form_errors">';
			echo '<h3>Oeps ... Foutje</h3>';
            echo '<ul>';
            	
				foreach($this -> beschrError as $error){
				
					echo '<li>' . $error . '</li>';
				
				}
				
            echo '</ul></div>';
            
			}
			
			if($this -> exists('beschrSucces')){
				echo '<div class="form_succes">';
				echo '<h3>'.$this -> beschrSucces.'</h3>';
				echo '</div>';
			}
            ?>
            
            <? 
			
				echo $this -> beschrForm -> render(); 
			
			?>
            
           <script type="text/javascript">
           
		   $(document).ready(function(){init(<?= $this -> x ?>,<?= $this -> y ?>)});

           </script> 
           
           
           
            <h2><a name="locatie">Locatie</a></h2>
           
           	<?
			if($this -> exists('locatieError')){
			echo '<div class="form_errors">';
			echo '<h3>Oeps ... Foutje</h3>';
            echo '<ul>';
            	
				foreach($this -> locatieError as $error){
				
					echo '<li>' . $error . '</li>';
				
				}
				
            echo '</ul></div>';
            
			}
			
			if($this -> exists('locatieSucces')){
				echo '<div class="form_succes">';
				echo '<h3>'.$this -> locatieSucces.'</h3>';
				echo '</div>';
			}else{
				echo " <div class='form_info'>Versleep het pijltje om je locatie te bepalen of vul een locatie in en druk op &quot;zoek locatie&quot;.</div> ";
			}
            ?>
           
           
            <form action="/gebruiker/profiel/<?=$this -> id ?>#locatie" method="post">
            <ul class="form_container">
                <li>
                	<label>Locatie:</label>
                    <input type="text" name="frm_locatie" id="frm_locatie"/>
                    <button id="frm_locatie_zoeken" class="noFloat" type="button">
                    	<span>Zoek locatie</span>
                    </button>
                </li>
             
                <li>
                    <div id="map_canvas"></div>
                    <input type="hidden" name="frm_x" id="frm_x" value="<?= $this -> x?>" />
                    <input type="hidden" name="frm_y" id="frm_y" value="<?= $this -> y?>" />
                </li>
                <li>
                	<button type="submit" name="frm_locatieBtn" id="frm_locatieBtn">
                    	<span>Wijzigen</span>
                    </button>
                </li>
                
               </ul>
               </form>
        </div>
 
  
<? include('footer.php'); ?>